﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="admin.ascx.cs" Inherits="NodeMenu_Admin" %>
<%@ Register Assembly="jungle" Namespace="Jungle.Modules" TagPrefix="JWC" %>

<style>
    .tbl0001
    {
        width: 50%;
    }
    
    .tbl0001 td
    {
        padding: 3px;
    }    
</style>
<asp:MultiView ID="GlobalMenu" runat="server">
    <asp:View ID="v0" runat="server">
        <table>
            <tr>
                <td colspan="2">
                    <asp:Label ID="lb_Title" runat="server" Text="Новый пункт меню" />
                </td>
            </tr>
            <tr>
                <td>Страница из стукртуры</td>
                <td>
                    <asp:DropDownList ID="ddl_Nodes" runat="server" />
                </td>
            </tr>
            <tr>
                <td>Родительский элемент</td>
                <td>
                    <asp:DropDownList ID="ddl_Parrents" runat="server">
                        <asp:ListItem Value="0" Text="Корень" />
                    </asp:DropDownList>
                </td>
            </tr>            
            <tr>
                <td>Заголовок</td>
                <td>
                    <asp:TextBox ID="tb_Title" runat="server" />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="<br />Надо заполнить поле" ValidationGroup="mainValid" ControlToValidate="tb_Title" Display="Dynamic" />
                </td>
            </tr>
            <tr>
                <td>Активность</td>
                <td>
                    <asp:CheckBox ID="chb_IsActive" runat="server" />
                </td>
            </tr>
            <tr>
                <td></td>
                <td>
                    <asp:ImageButton ID="btn_Add" ValidationGroup="mainValid" OnClick="AddItem" ImageUrl="~/Admin/img/add.jpg" runat="server" />
                    <asp:ImageButton ID="btn_Edit" Visible="false" ValidationGroup="mainValid" OnClick="EditItem" ImageUrl="~/Admin/img/save.jpg" runat="server" />
                    <br/>
                    <asp:Label ID="lb_error" runat="server" ForeColor="Red" />
                </td>
            </tr>
        </table>
    </asp:View>
    <asp:View ID="v1" runat="server">
        <JWC:Admin_ItemList ID="Admin_ItemList1" runat="server" />
        <div>
            Расположение пунктов меню
            <asp:DropDownList ID="ddl_mType" AutoPostBack="true" OnTextChanged="Chanchge_mType" runat="server">
                <asp:ListItem Value="Horizont" Text="Горизонтальное" />
                <asp:ListItem Value="Vertical" Text="Вертикальное" />
            </asp:DropDownList>
        </div>
        <div align="right">
            <asp:ImageButton ID="btn_OpenAddItem" ToolTip="Новый пункт Меню"  OnClick="OpenAddItem" ImageUrl="~/Admin/img/add.jpg" runat="server" />
        </div>
    </asp:View>
</asp:MultiView>
